package com.yellowpage.wf.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * Workflow entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_RESOURCE")
public class Resource implements java.io.Serializable {

	// Fields

	private Long resourceId;
	private String name;
	private String type;
	private Date createTime;
	private Long createUser;
	private String status;
	private String dir;

	// Constructors

	/** default constructor */
	public Resource() {
	}

	/** full constructor */
	public Resource(String name, String type, Date createTime, Long createUser,
			String status, String dir) {
		this.name = name;
		this.type = type;
		this.createUser = createUser;
		this.createTime = createTime;
		this.status = status;
		this.dir = dir;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "RESOURCE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getResourceId() {
		return this.resourceId;
	}

	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}

	@Column(name = "NAME", length = 128)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "TYPE", length = 64)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}
	
	@Column(name = "STATUS", length = 12)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Column(name = "DIR", length = 128)
	public String getDir() {
		return this.dir;
	}

	public void setDir(String dir) {
		this.dir = dir;
	}

}